# -*- coding: utf-8 -*-

# @Project : UI_DDTFrameWork
# @Author  : Mr.Deng
# @Time    : 2021/9/21 19:09

"""
获取测试数据
"""

from common.tools.logConfig import Logger
from config.filePathConfig import testDataPath

import yaml

Log = Logger().origin_logger


def get_data(fileName):
    """
    获取yaml文件中的测试数据
    :return:
    """
    with open(testDataPath + fileName, "r", encoding="utf-8") as f:
        data = yaml.load(f, Loader=yaml.Loader)
        Log.info(f"获取测试数据：\n{data}")

    return data


# if __name__ == '__main__':
#     a = get_data("homeSetData.yaml")
#     print(a[0]["expectation"] == "None")
